









package com.company.szuhemoshi.section2;

import java.util.ArrayList;

/**
 * @author cbf4Life cbf4life@126.com
 * I'm glad to share my knowledge with you all.
 * ��Щ��֦�ڵ�Ҳ������Щ�쵼�Ǽ�Ҫ���Լ�����Ϣ����Ҫ֪���Լ����������
 */
@SuppressWarnings("all")
public class Branch implements IBranch, ICorp {
	
	private String name = "";
	
	private String position = "";
	
	private int salary = 0;
	
	ArrayList<ICorp> subordinateList = new ArrayList<ICorp>();
	
	
	public Branch(String name,String position,int salary){
		this.name = name;
		this.position = position;
		this.salary = salary;
	}
	
	
	public void addSubordinate(ICorp corp) {
		this.subordinateList.add(corp);
	}

	
	public ArrayList<ICorp> getSubordinate() {
		return this.subordinateList;
	}

	
	public String getInfo() {
		String info = "";
		info = "������" + this.name;
		info = info + "\tְλ��"+ this.position;
		info = info + "\tнˮ��" + this.salary;
		return info;
	}

}